The present invention relates generally to a computing system having a novel serial communication bus, and more particularly to a novel communication protocol for communicating with peripheral devices connected to the serial communication bus.
Hot pluggable peripheral device communication buses are well known in the art. For example, universal serial bus (USB) is an external bus standard that supports data transfer rates of up to 12 megabits per second. A single USB port can be used to connect up to 127 peripheral devices, such as mice, modems, keyboards, and the like.
Another external bus standard is IEEE 1394, also commonly referred to as Firewire, I-link and/or Lynx. IEEE 1394 is a very fast external bus standard that supports data transfer rates of up to 400 megabits per second. A single IEEE 1394 port can be used to connect up to 63 external devices.
Both IEEE 1394 and USB support plug and play and hot plugging installations, and also provide power to the connected peripheral devices.
When using these external device communication buses, it is important to be able to determine which devices are connected to the bus, what the device capabilities are, and what the physical configuration of the peripheral devices are; especially when daisy chaining devices together and hot plugging devices onto the bus on the fly.
For example, if new devices are added to the communication bus, either directly or through another peripheral device with connection ports, the host device will need to determine where the devices are located, what the devices are, and what the topology of the connections are (i.e., the connection path to the devices). In addition, the host may need to initialize the devices, for example calibrating a joy stick, or down loading software drivers, before the devices can be used.
Also, during normal operation, it is important that the host be able to efficiently read status information from the devices, such as keystrokes, button presses, joystick positions, mouse movements, and the like. This status information should be read frequently, commonly between 50 and 100 times per second, so it is important that these functions do not require much host processing overhead. Finally, it is important that the host be able to detect device configuration changes (e.g., the removal of a device or a device error) simply, as the host will pole for changes at regular intervals.
The problem with USB and IEEE 1394 is that they require complex communication protocols to handle bus arbitration functionality and other complex communication tasks. In many instances, these complex protocols are not necessary and it is desirable to have a more simplified communication bus and protocol. Thus, what is needed is a simple, yet robust serial communication bus and associated communication protocol for connecting serial peripheral devices.
According to the invention, a computing system comprising a host device which includes a serial communication bus and a processor for controlling communication over the serial communication bus. The computing system further comprises one or more peripheral devices connected to the communication bus. Communication between the host device and the peripheral devices is facilitated by a communication protocol, which includes a procedure for discovering whether the configuration of peripheral devices connected to the communication bus has changed.
The discovery procedure starts by the host device sending a first command to all peripheral devices connected to the serial communication bus to determine if the configuration of any of the peripheral devices has changed. Configuration changes may include a new device being added to the bus, a device being removed from the bus, a device being moved to a different port on or a different connection to the bus, an error with a device, or any other suitable configuration change.
If a new peripheral device has been added to the communication bus, the host sends a focus command to a first comm bus port on the communication bus to focus that particular port. The host then sends a command to the first comm bus port to determine if a valid, focused peripheral device is connected to that port. If a valid peripheral device is connected to the first comm bus port, the host obtains device configuration information from the first valid peripheral device. If the first valid peripheral device does not include a device ID from the host, the host assigns a device ID to the first valid peripheral device. In addition, the host will set-up driver software for the first valid peripheral device, if necessary.
After the first valid peripheral device is initialized, the host tags the first valid peripheral device, sends a blur command to it, and selects a first device port on the first valid peripheral device. The blur command is converted to a focus command at the first valid peripheral device and then sent to the selected first device port on the first, valid peripheral device. The blur command also is sent to all other devices on the comm bus port, but the devices that are not tagged merely pass the command through as a blur command, which requires no processing or response. The focus command focuses any device connected to the first device port. The host then sends a command to the first device port to determine if a valid, focused device is connected to that port. If a second valid peripheral device is connected to the first device port, the host obtains device configuration information from the second valid peripheral device. As with the first valid peripheral device, if the second valid peripheral device does not have an ID from the host, the host will assign it an ID. Also, the host will load driver software for the second valid peripheral device, if necessary.
If there is no second valid peripheral device connected to the first device port of the first valid peripheral device, the host determines if there is a second device port on the first valid peripheral device. If there is a second device port, the host sends a blur command to the first valid peripheral device and selects the second device port thereon. The blur command is converted to a focus command at the first valid peripheral device and then sent to the selected second device port on the first valid peripheral device. The focus command focuses any device connected to the second device port. The host then sends a command to the second device port to determine if a valid device is connected to that port. If a second valid peripheral device is connected to the second device port, the host obtains device configuration information from the second valid peripheral device. As discussed above, if the second valid peripheral device does not have an ID from the host, the host will assign it an ID. Also, the host will load driver software for the second valid peripheral device, if necessary.
If there is no second device port on the first valid peripheral device and there is a second comm bus port on the communication bus, the host sends a focus command to the second comm bus port on the communication bus, which focuses any device connected to the second comm bus port. The host then sends a command to determine if a valid, focused peripheral device is connected to the second comm bus port. If there is a valid peripheral device connected to the second comm bus port, the host will initialize the device in the same manner as discussed above. The procedure is then continued until every device on every port has been checked and initialized, if necessary.
A more complete understanding of the present invention may be derived by referring to the detailed description of preferred embodiments and claims when considered in connection with the figures, wherein like reference numbers refer to similar items throughout the figures.